const {resolve} = require("path");
module.exports = {
	entry: "./src/myPromise.js",
	output: {
		clean: true,
		filename: "promise.umd.js",
		path: resolve(__dirname, "dist"),
		library: {
			name: "promise",
			type: "umd",
			export: "default"
		}
	},
	module: {
		rules: [
			{
				test: /\.js$/,
				exclude: /node_modules/,
				use: {
					loader: "babel-loader",
					options: {
						presets: [
							[
								"@babel/preset-env"
							]
						]
					}
				}
			}
		]
	},
	mode: "production"
}
